package com.partsoft.dits.log;

import java.util.List;

import com.partsoft.dits.DataChangeLog;
import com.partsoft.dits.DataEdgeDescriptor;

/**
 * 数据变更日志获取适配器
 */
public interface ChangeLogResolver {

	String getLastChangeLogIdByDataIdentity(DataEdgeDescriptor dataDesc, String skey);

	List<DataChangeLog> getChangeLogGreaterThanId(DataEdgeDescriptor dataDesc, String changeLogId, int from, int count);
	
	List<DataChangeLog> getChangeLogGreaterThanId(DataEdgeDescriptor dataDesc, String changeLogId);
	
	int countChangeLogGreaterThanId(DataEdgeDescriptor dataDesc, String changeLogId);
	
	/**
	 * 返回最后变更的日志记录
	 * @param dataDesc 集成数据描述符
	 * @return 如果{@link DataEdgeDescriptor#getId()}内容以“;”分割，则取最大值返回。
	 */
	DataChangeLog getLastChangeLog(DataEdgeDescriptor dataDesc);

}
